<?php
    require_once './Class/DataIN/Time.php';
    require_once './Class/DataIN/Historical.php';
    require_once './Class/DataIN/Average.php';
    require_once './Class/DataIN/GrowthHistorical.php';
    require_once './Class/DataIN/GrowthAverage.php';
    require_once './Class/DataOut/Value.php';
    require_once './Class/DataOut/Growth.php';
    require_once './Const/Constants.php';
    require_once './Class/DataGenerator.php';

    

    
    $name = '';
    if(isset($_POST) && count($_POST)>0)
    {
        $config = $_POST;
        $config['type'] = $_GET['type'];
       
        $test = new DataGenerator(DataGenerator::inHistorical, DataGenerator::outValue, $config);
        $test ->generateData(20);
        $test->generateFile("dejm");
        

      
    }
    
    
    
    
    
    

?>

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
        <link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
        <script src="//code.jquery.com/jquery-1.10.2.js"></script>
        <script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
        <link rel="stylesheet" href="/resources/demos/style.css">
        <script>
            $(function() {
              $( ".datepicker" ).datepicker({
                dateFormat: "yy-mm-dd"
              });
            });
        </script>
    </head>
    <body>
        
       
           
        <h1>GPW</h1>
        <form action="?type=gpw" method="POST">
            Date: <input type="text" name="dateTo" class="datepicker">
            <select name="isin">
                <option value="PLZYWIC00016">Żywiec</option>
                <option value="PLPEKAO00016">PEKAO</option>
                <option value="PLK2ITR00010">K2INTERNT</option>
                <option value="PLKRCHM00015">Alma</option>
            </select>
            <br>
            
        
            
            <input type="submit" value="Pobierz">

            
            
            
        </form>
        
        <h1>Yahoo</h1>
        <form action="?type=yahoo" method="POST">
            Date: <input type="text" name="dateTo" class="datepicker">
            <select name="isin">
                <option value="ACN">ACN</option>
                <option value="BP">BP</option>
                <option value="FB">Facebook</option>
            </select>
            <br>
             
            
            
       
            <input type="submit" value="Pobierz">
        </form>
        
    </body>
</html>
